import React, { useState } from "react";
import { Modal } from "antd";
function MyAlert(props: MyAlertProps) {
  const { isModalVisible, handleOk, handleCancel, title , okText ,cancelText} = props;

  return (
    <div className="MyAlert">
      <Modal
        title={title}
        visible={isModalVisible}
        onOk={handleOk}
        onCancel={handleCancel}
        cancelText={cancelText}
        okText={okText}
      >
        {
          props.children
        }
      </Modal>
    </div>
  );
}
export default MyAlert;
